package info.akabana.yui.examples.fx3.empinfo.helper
{
	import info.akabana.yui.examples.fx3.empinfo.view.EmpInfoView;
	import info.akabana.yui.examples.fx3.model.EmpInfoModel;
	
	import org.seasar.akabana.yui.core.event.notify;
	
	public class EmpInfoUpdateHelper
	{
		public var view:EmpInfoView;
		
		public function update():void {
			
			var model:EmpInfoModel = view.data as EmpInfoModel;
			
			model.name = view.txtinptName.text;
			model.mobilePhone = view.txtinptMobilePhone.text;
			model.email = view.txtinptEmail.text;
			model.emailMobile = view.txtinptEmailMobile.text;
			model.positionCode = view.cmbbxPosition.selectedItem.code;
			
			notify(view, "update", model);
		}
	}
}